package com.hm.service.api.main;

import com.hm.service.framework.PostController;
import com.hm.service.service.main.LoginQRCodeService;
import jakarta.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;


@RestController
@RequestMapping(value = "/MAIN", produces = {"application/json;charset=UTF-8"})
public class SZCG_000_000_006 extends PostController {

    private static final Logger logger = LoggerFactory.getLogger(SZCG_000_000_006.class);

    private final LoginQRCodeService loginQRCodeService;

    //获取登录二维码-测试用
    public SZCG_000_000_006(LoginQRCodeService loginQRCodeService) {
        this.loginQRCodeService = loginQRCodeService;
    }

    @PostMapping(value = "/000_000_006")
    public String doPost(HttpServletRequest request) {
        return handleRequest(request);
    }


    @Override
    protected String postRequest(HashMap<String, String> requestParam) {
        HashMap<String, String> resMap = new HashMap<>();
        resMap.put("QRCode", loginQRCodeService.generateQRCode());
        return generateSucceed(resMap);
    }
}
